
object HelloWorld {

  def main(args: Array[String]): Unit = {
    var(num,sum) = (100,0)
    while (num >0){  //出口
      sum = sum + num
      num = num -1  //步上
    }
    println(sum)
  }


}
